package com.chp.controller;

import com.chp.common.util.R;
import com.chp.service.IClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ClassesController
 * Package: com.chp.controller
 * Description:前端控制器
 *
 * @Author Chope
 * @Create 2025/1/7 18:49
 * @Version 1.0
 */
@RestController
@RequestMapping("/classes")
public class ClassesController {
    @Autowired
    private IClassesService classesService;

    @GetMapping("/list")
    public R list() {
        return R.ok().data("list", classesService.list());
    }
}
